package com.dq.mapper;

import com.dq.pojo.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AdminMapper {

    @Select("select * from admin")
    Admin selectAdmin(Admin admin);

    @Update("UPDATE admin SET avatar_name = #{avatarName} WHERE id = #{userId}")
    void updateAvatar(String avatarName,Long userId);

    @Select("select * from admin where id = #{id}")
    Admin selectById(Long id);

    @Update("UPDATE admin SET password = #{password} WHERE id = #{id}")
    void updateInfo(Admin admin);
}
